import React, { useState, useEffect } from 'react'
import { getInfo } from "../../service/userService";
import { Image } from "antd-mobile"

export default function Detail() {
    let [info, setInfo] = useState<any>({});
    useEffect(() => {
        getInfo({}).then(res => {
            setInfo(res.data.user);
        })

    }, []);
    return (
        <div>
            <div>头像 <Image src={"http://124.93.196.45:10001/prod-api/" + info.avatar}></Image></div>
            <div>余额 {info.balance}</div>
            <div>昵称{info.nickName}</div>
            <div>电话{info.phonenumber}</div>

        </div>
    )
}
